﻿@using CodeCamp.Models
@model RegisterModel
@{
    @* ViewBag.RegistrationUrl set in code - SetSharedViewBagProperties *@
    ViewBag.EventName = "";
    ViewBag.Title = "";
    if ((@Model != null) && (@Model.EventDisplayName != null))
    {
        ViewBag.Title = (@Model.EventDisplayName + " | Site Account Creation");
        ViewBag.EventName = @Model.EventDisplayName;
    }
    else
    {
        ViewBag.Title = "Code Camp | Site Account Creation";
        ViewBag.EventName = "Code Camp";
    }
}

@section headaddon {
<style>
    #Email
    {
        width: 30em;
    }
</style>
}

<h1>Registering for @ViewBag.EventName?</h1>
<p>&nbsp;</p>
<h2>Click here for <a href="@ViewBag.RegistrationUrl">@ViewBag.EventName attendee registration</a>.</h2>
<p>
    Free registration to attend @ViewBag.EventName is provided through EventBright.com.
</p>
<p>
    Space is limited, so please <a href="@ViewBag.RegistrationUrl">sign up today</a>.
</p>
<p>&nbsp;</p>
@if (@Model.SubmissionsOpen || @Model.PresenterLoginCreationAllowed)
{
    <h2>Create a Site Account</h2>
    <p>
        Accounts on this website allow presenters to create profiles and propose session.
        If you want to attend @Html.Encode(@ViewBag.EventName), please use our <a href="@ViewBag.RegistrationUrl">attendee registration</a> at EventBright.
    </p>
@Html.Partial("RegisterPartial", @Model)
}
else
{
    <h2>Presenter Signup is closed for this event.</h2>
    if (Model.DefaultEventShortName != Model.EventShortName)
    {
        <p>@Html.ActionLink(string.Format("Sign up as presenter for {0}.", @Model.DefaultEventDisplayName), "Create", new { eventName = @Model.DefaultEventShortName })</p>
    }
    else
    {
        <p>Please check back for our next event.</p>
    }
}

@section sidebar {
    @Html.Partial("SidebarCommonPartial")
}
